package com.example.salesystem.service.impl;

import com.example.salesystem.model.Order;
import com.example.salesystem.mapper.OrderMapper;
import com.example.salesystem.service.IOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lishuo
 * @since 2024-05-18
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements IOrderService {
    @Autowired
    private OrderMapper orderMapper;

    /**
     *
     * @param id
     * @return
     */
    @Override
    public List<Order> getCars(Long id) {
        return orderMapper.getCars(id);
    }

    /**
     * 获取订单列表（已结算）
     * @param id
     * @return
     */
    @Override
    public List<Order> getOrders(Long id) {
        return orderMapper.getOrders(id);
    }
}
